function xm = cauta( f, a, x )
    n = length(x) ;
    k=1;
    x = sort(x);
    for i=x(1): 0.01 : x(n)
      maxt(k)=abs(f(i)-pn(a, i));
      t(k++)=i;
    endfor
    xmax=t( find(max( maxt ) == maxt));
    if(length(xmax) > 1)
      xm = max(xmax);
    else
      xm=xmax;
    endif
endfunction
